package com.cnd.scm.report;


import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

import javax.servlet.Servlet;

/**
 * @version V1.0
 * @ClassName: ReportConfig
 * @Description:
 * @author: 李启联
 * @date: 2020-04-17 10:45
 * @Copyright: Copyright (c), 2020
 */
@Configuration
@ImportResource("classpath:context.xml") // 加载ureport对应的xml配置文件
public class ReportConfig {

    /**
     * ureport2报表Servlet配置
     */
    @Bean
    public ServletRegistrationBean ureport2Servlet(){
        return new ServletRegistrationBean(new UReportServlet(), "/ureport/*");
    }



}